package cn.quevo.ucenter.client.entity;

import java.util.List;

import cn.quevo.ucenter.core.token.AbstractAuthorizationToken;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class TokenClientUser extends AbstractAuthorizationToken {

    /** 访问令牌 */
    private String accessToken;
    /** 客户端ID */
    private String clientId;
    /** 主体ID */
    private Long subjectId;
    /** 过期时间 */
    private Long expiredIn;
    /** 记录拥有者 */
    private Long recordOwnerId;
    /** 菜单列表 */
    private List<TreeMenu> menus;
    /** 记录拥有者名称 */
    private String recordOwnerName;
    /** 昵称 */
    private String nickName;
    /** 用户名 */
    private String userName;

    @Override
    public Long getExpiredIn() {
        this.expiredIn = 7200L;
        return this.expiredIn;
    }
    
    @Override
    public boolean isExpired() {
        return super.isExpired();
    }
}
